package com.deductive.domain.special;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.deductive.common.config.mybatis.GeoJsonToGeometryDeserializer;
import com.deductive.common.config.mybatis.GeometryToGeoJsonSerializer;
import com.deductive.common.config.mybatis.GeometryTypeHandler;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

/**
 * 血库
 * @TableName special_blood_bank
 */
@ApiModel(value = "SpecialBloodBank", description = "血库信息")
@TableName(value ="special_blood_bank")
@Data
public class SpecialBloodBank implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 空间几何数据
     */
    @ApiModelProperty(value = "空间几何数据")
    @TableField(value = "geom", typeHandler = GeometryTypeHandler.class)
    @JsonSerialize(using = GeometryToGeoJsonSerializer.class)
    @JsonDeserialize(using = GeoJsonToGeometryDeserializer.class)
    private Geometry geom;

    /**
     * 中文名称
     */
    @ApiModelProperty(value = "中文名称")
    @TableField(value = "chinese_name")
    private String chineseName;

    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    @TableField(value = "english_name")
    private String englishName;

    /**
     * 国家名
     */
    @ApiModelProperty(value = "国家名")
    @TableField(value = "country_name")
    private String countryName;

    /**
     * 概述
     */
    @ApiModelProperty(value = "概述")
    @TableField(value = "overview")
    private String overview;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    @TableField(value = "address")
    private String address;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    @TableField(value = "type")
    private String type;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    @TableField(value = "lon")
    private Double lon;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    @TableField(value = "lat")
    private Double lat;

    /**
     * 网址
     */
    @ApiModelProperty(value = "网址")
    @TableField(value = "website")
    private String website;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @TableField(value = "phone_number")
    private String phoneNumber;

    /**
     * 父Id
     */
    @ApiModelProperty(value = "父Id")
    @TableField(value = "parent_id")
    private Integer parentId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}